#pragma once
#include <deque>

//////////////////////
// Forward declaration
struct SubpixelInfo;

class Booker
{
	typedef std::deque<SubpixelInfo**> InfoCollection;
	InfoCollection mBuffers;
	SubpixelInfo** mLastBuffer;
	int mIndexOfLastBuffer;
	int mNextPositionInsideLastBuffer;

public:
	Booker();
	~Booker();

	void AddReference(SubpixelInfo*);
	void AddUnmaskedReferencesTo(Booker& recipientBooker, 
		char testBitsMask, char addBitsMask) const;
	void ChangeInfosOccupiedState(char addBitsMask, char clearBitsMask);
	void RemoveAllReferences();
};

